1. Field of the Invention
The present invention relates to the technical field of color processing and, more particularly, to a system and method for adaptive color space conversion.
2. Description of Related Art
The color image devices (such as a computer display) mostly use the three primary color signals, i.e., R, G, B, for color representation in the market. Since a typical color image device is designed in accordance with the color domain range rendered on the CRT screen. Thus, for the same color representation on the peripheral information products, a Standard RGB (sRGB) is defined as a standard color space for the information products based on the computer multimedia applications.
The Standard RGB (sRGB) specification is submitted by the HP Company and the Microsoft Corporation. The sRGB specification defines standard color conditions and code exchange modes. Since the color reproduction on the CRT screen is mostly considered for the color range of a typical image playback content, the sRGB specification is typically used as a basis.
However, owing to the rapid advance of technologies, the sRGB specification cannot meet the color representation for a high definition TV (HDTV). The image playback contents of the displays with color representation capability and requirement higher than the sRGB specification are thus limited to the sRGB range. In this case, the high-level displays cannot completely show the color playback features.
To overcome this, ICE 61966-2-4 defines a new standard for color space, which is referred to as xvYCC and can support the color information of wide color domain.
The xvYCC uses the ITU-R BT. 709 color domain to standardize a wider color domain for assuring the compatibility with the sRGB under the HDTV condition. The sRGB specification renders colors in a range of 0 to 1, and the xvYCC specification in a range of −1 to +1, which is over the color range defined by the sRGB specification. However, since the xvYCC is compatible with the sRGB, current image output products including a TV can receive the xvYCC image content and correctly display the colors of film under the sRGB specification.
The difference of the YCbCr representation between the xvYCC and the sRGB specifications is the defined gamut. FIG. 1 is a schematic graph of xvYCC and sRGB specifications. As shown in FIG. 1, the diamond indicates a gamut converted from BT. 709 RGB into YCbCr, i.e., the YCbCr gamut of the sRGB, and the YCbCr gamut of the xvYCC is extended to the periphery of the sRGB specification, for example, the two rectangles, thereby extending the gamut of color space. U.S. Pat. No. 7,271,812 granted to Van Dyke, et al. for a “Method and apparatus for color space conversion” has disclosed a method for color space conversion to convert between color space formats.
However, when YCbCr of the xvYCC specification is converted into BT. 709 RGB, the resulting RGB may exceed the gamut. A typical solution in the prior art limits the values over the gamut to the maximum and minimum, which is referred to as a hard clip. FIG. 2 is a schematic graph of a typical hard clip operation. Take 8-bit for example, a value over 255 is limited to 255, and a value smaller than zero is limited to zero. Namely, all the RGB input values exceeding a threshold (255) are limited to the maximum, i.e., the threshold. In this case, when the RGB values of pixels of an image exceed the threshold, the output values mostly are the threshold as the maximum (255) by a hard clip operation. Then, the details on image content. Thus, the output image content has a poorer representation in the details.
By contrast, a typical soft clip uses an additional oblique line to define the relationship between RGB input and output values when the RGB input values exceed a threshold. FIG. 3 is a schematic graph of a typical soft clip operation. As shown in FIG. 3, in the soft clip operation, when the RGB input values are smaller than a first threshold ‘a’, the relationship between the RGB input and output values is as same as that in the hard clip operation. When the RGB input values are greater than the first threshold ‘a’ and smaller than a second threshold ‘b’, an oblique line with a small slope is used to define the relationship between the RGB input and output values to thereby reduce the lost details of the image content occurred in the hard clip operation.
However, for a gray image, the maximum of a gray level cannot be displayed because the image is clipped. Accordingly, the brightness is reduced, which causes the eyes of a viewer uncomfortable.
Therefore, it is desirable to provide an improved system and method for adaptive color space conversion to mitigate and/or obviate the aforementioned problems.